/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.calculator.conf;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.context.annotation.Bean;
import za.ac.cput.calculator.calculator.Calculator;
import za.ac.cput.calculator.calculator.Impl.CalculatorImpl;
import za.ac.cput.calculator.calculator.Impl.ImprovedCalculatorImpl;

/**
 *
 * @author boniface
 */
@Configurable
public class AppConfig {

    @Bean(name = "oldcalc")
    public Calculator calculator() {
        return new CalculatorImpl();
    }

    @Bean
    public Calculator newCalc() {
        return new CalculatorImpl();
    }

    @Bean(name = "calc")
    public Calculator improvedCalculator() {
        return new ImprovedCalculatorImpl();
    }
}
